using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(AudioStudio.EffectSound)), CanEditMultipleObjects]
public class EffectSoundInspector : Editor
{
    AudioStudio.EffectSound component;

    void OnEnable()
    {
        component = target as AudioStudio.EffectSound;
    }

    public override void OnInspectorGUI()
    {
        serializedObject.Update();
        
        GUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Is Update Position");
        component.IsUpdatePosition = EditorGUILayout.Toggle(component.IsUpdatePosition);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.LabelField("Enable Trigger Events:");
        AudioScriptGUI.DrawList(serializedObject.FindProperty("enables"));
        EditorGUILayout.LabelField("Disable Trigger Events:");
        AudioScriptGUI.DrawList(serializedObject.FindProperty("disables"));
        serializedObject.ApplyModifiedProperties();
    }
}